home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 291_01 / jjb_read.doc < prev    next >
Text File  |  1989-06-26  |  84KB  |  2,068 lines

  1.  
  2. =====================================================================
  3. ***       JJB 1.2  for  QUICK C  and  TURBO C  programmers        ***
  4. =====================================================================
  5.  
  6.  
  7. Welcome, Turbo C and Quick C programmers, to JJB 1.2
  8.  
  9. JJB  is  a  high-level  programming environment you may use under the
  10. Shareware concept to program ANY PROGRAMMING  APPLICATION  including:
  11. graphics, communication, data base, utilities, etc. The code is tight
  12. and executes your program fast. 
  13.  
  14. JJB  1.2  is  the first in a series of software products I am writing
  15. which enables  the  'C'  programmer  to  write  professional  looking
  16. programs in minutes instead of taking days, weeks, or even months.
  17.  
  18. I hope you enjoy using JJB and I welcome you to become  a  registered
  19. user so you can share in all the advantages that programming with JJB
  20. has  to offer. I am currently working on my next release JJB LA (Large
  21. Application). 
  22.  
  23.  
  24. JOHN JAMES BRODERICK
  25. JJB
  26. 9236 Church Rd, Suite 1082
  27. Dallas, Tx 75231
  28. (214) 341-1635
  29.  
  30.  
  31. ______________________________________________________________________
  32.  
  33. Copyright (c) 1988, 1989. JJB All rights reserved.
  34. Quick C is a trademark of Microsoft Corp.
  35. Turbo C is a trademark of Borland International, Inc.
  36. _______________________________________________________________________
  37.  
  38.  
  39.  
  40.  
  41.           ************************************************
  42.           *                                              *
  43.           *            CONTENTS OF THIS FILE             *
  44.           *                                              *
  45.           *   1.  JJB OVERVIEW.  What is JJB ?           *
  46.           *   2.  WHERE DID THE IDEA OF JJB COME FROM?   *
  47.           *   3.  SUMMARY OF DOCUMENTATION,              *
  48.           *                  INSTALLATION, and           *
  49.           *                  REGISTRATION.               *
  50.           *   4.  JJB FILES LISTED & EXPLAINED.          *
  51.           *   5.  QUICK C LEARNING INSTALLATION.         *
  52.           *   6.  QUICK C FINAL    INSTALLATION.         *
  53.           *   7.  TURBO C LEARNING INSTALLATION.         *
  54.           *   8.  TURBO C FINAL    INSTALLATION.         *
  55.           *   9.  JJB FUNCTIONS LISTED & EXPLAINED.      *
  56.           *  10.  REGISTRATION FORM.                     *
  57.           *                                              *
  58.           ************************************************
  59.  
  60.  
  61.  
  62. ======================================================================
  63. ***           JJB 1.2 for QUICK C and TURBO C programmers          ***
  64. ======================================================================
  65.  
  66.  
  67.                            JJB 1.2
  68.  
  69.  
  70.        1.  New, different, unique.
  71.  
  72.        2.  A high-level, C programming environment.
  73.  
  74.        3.  Professionally written and completely documented.
  75.      
  76.        4.  Designed for Quick C and Turbo C programmers.
  77.  
  78.        5.  JJB 1.2 is included with this literature and
  79.                 is ready to use.
  80.  
  81.        6.  Easy to install.   Easy to begin using.
  82.  
  83.        7.  Executes your program fast--direct memory access.
  84.  
  85.        8.  Makes your program portable:
  86.                 Runs on IBM PC, XT, AT 286, 386 and compatible
  87.                 computers with monochrome, CGA, EGA, VGA, etc.
  88.  
  89.        9.  Allows C programs to be written in minutes.
  90.  
  91.       10.  Distributed under the Shareware concept.
  92.  
  93.  
  94.  
  95. JJB  is  a  foundation  of functions from low-level to high-level upon
  96. which  you  can build your program. The functions execute fast and are
  97. coded  tight  to  conserve memory for your program. With them, you can
  98. program in an extreme high-level 'C' environment maintaining  complete
  99. low-level control over your program. 
  100.  
  101.  
  102. JJB automatically handles many things for you such as making pull-down
  103. menus, testing  each  keypress,  handling  color  attributes  for  the
  104. different  video  modes, changing from one option to another, and many
  105. more routine tasks you should not have to do.
  106.  
  107.  
  108. JJB  actually executes (runs) your program. JJB handles every keypress
  109. in your program. From any option in your program, you can select,  and
  110. go  to any other option. Each option can be initalized and exited with
  111. a function. You never have to test a keypress.
  112.  
  113.  
  114.  
  115.  
  116. =====================================================================
  117. ***   FOR CLUBS AND COMPANIES DISTRIBUTING SHAREWARE SOFTWARE     ***
  118. =====================================================================
  119.  
  120.  
  121. This  is  the  complete  JJB  1.2  programming  environment   designed
  122. especially for QUICK C and TURBO C programmers. 
  123.  
  124. JJB  is  a programming environment which allows the 'C' programmer to
  125. easily and quickly write professional looking programs.
  126.  
  127.  
  128. I am the author and you have my permission  to  freely  circulate  it
  129. under  the  Shareware  concept  as  long as you do not add, delete or
  130. change JJB files. 
  131.  
  132.  
  133. The documentation is complete  with  over  50  pages  including  five
  134. sample source files all of which can be printed with one dos command.
  135.  
  136.  
  137. Installation is as easy as placing  the  diskette  in  drive  a:  and
  138. entering  the  installation  command.  Within  one  minute  it will be
  139. installed.  There is a learning installation, a final installation and
  140. even a reverse  installation  for  keeping  your  hard  disk  free  of
  141. unnecessary files. 
  142.  
  143.  
  144. This  file  'JJB-READ.DOC' explains everything the QUICK C and TURBO C
  145. programmer needs to get started. All documentation can be printed from
  146. dos by entering 'JJBPRINT'. 
  147.  
  148.  
  149.  
  150. John James Broderick
  151. JJB
  152. 9236 Church Rd, Suite 1082
  153. Dallas, Tx. 75231
  154. (214) 341-1635
  155.  
  156.  
  157.  
  158.  
  159. ======================================================================
  160. ***        JJB 1.2   for QUICK C  and  TURBO C programmers         ***
  161. ----------------------------------------------------------------------
  162. ***  Distributed under the Shareware concept.    Registration $49  ***
  163. ======================================================================
  164.      
  165.      
  166.                                 JJB 
  167.                      9236 Church Rd, Suite #1082
  168.                          Dallas, Texas 75231
  169.                            (214) 341-1635 
  170.      
  171.      
  172.      USE  JJB  TO  WRITE  QUICK  C AND TURBO C PROGRAMS FAST. JJB
  173.      HANDLES EXECUTING YOUR PROGRAM FUNCTIONS.  IT  AUTOMATICALLY
  174.      DOES YOUR PULL-DOWN MENUS, OPTION SELECTION, FAST WINDOWING,
  175.      ENTRY  INPUT,  AND  IS  100%  PORTABLE.  ANY  BEGINNING  'C'
  176.      PROGRAMMER CAN START USING JJB IN MINUTES. 
  177.      
  178.      JJB IS A SET OF FUNCTIONS AND ARRAYS WHICH HOLDS INFORMATION
  179.      ABOUT YOUR PROGRAM OPTIONS. EACH OPTION CAN  BE  ASSIGNED  A
  180.      STRING  DESCRIPTION  AND  A  FUNCTION NAME. THEY ARE GROUPED
  181.      TOGETHER TO FORM PULL-DOWN MENUS AND BOTH OPTIONS AND GROUPS
  182.      CAN BE INITALIZED AND EXITED WITH PROGRAM FUNCTIONS.
  183.      
  184.      FROM ANY OPTION IN YOUR PROGRAM, YOU CAN  SELECT  ANY  OTHER
  185.      OPTION  BY  PRESSING  'ALT'  AND MAKING A SELECTION FROM THE
  186.      PULL-DOWN MENUS, OR YOU CAN PRESS AN ASSIGNED  FUNCTION  KEY
  187.      GOING  DIRECTLY  TO THE OPTION. JJB HANDLES CHANGING OPTIONS
  188.      BY EXECUTING THE FUNCTION FOR THE OPTION SELECTED.
  189.      
  190.      JJB  IS DESIGNED SO THE SOFTWARE YOU WRITE TODAY WILL RUN ON
  191.      EVERY IBM PC, XT, AT 286, 386 AND COMPATIBLE COMPUTER AND ON
  192.      ALL VIDEO CONTROLLERS MONOCHROME, CGA, EGA, VGA,  ETC,  PLUS
  193.      IT  SHOULD  ALSO  RUN ON UPWARD-COMPATIBLE COMPUTERS MADE IN
  194.      THE FUTURE.
  195.      
  196.      FEATURES INCLUDE: DIRECT MEMORY ACCESS--OVER 30 'VIDEO FAST'
  197.      'VF'  FUNCTIONS PROGRAMMED FOR TIGHT, PORTABLE KILLER SPEED,
  198.      EASY  COLORING  AND  WINDOWING,  COMPLETE  SET  OF  KEYBOARD
  199.      FUNCTIONS FOR HIGH-LEVEL DATA ENTRY, KEYBOARD TESTING IS ALL
  200.      AUTOMATIC  AND  DONE  BY  JJB,  YET  YOU  CAN  OVERRIDE  FOR
  201.      LOW-LEVEL CONTROL.
  202.      
  203.      YOU  CAN  GENERATE INTERNAL USER KEYPRESSES, INPUT FUNCTIONS
  204.      CAN EDIT FROM/TO  INPUT  RANGES,  ENTER  FUNCTIONS  DIRECTLY
  205.      UPDATE  DATA  BUFFERS, GET AND SET FUNCTIONS ALLOW LOW-LEVEL
  206.      CONTROL  TO ACCESS  OR CHANGE  SWITCHES AND VARIABLES.   JJB
  207.      PROVIDES  A  HIGH-LEVEL  PROGRAMMING   ENVIRONMENT  FOR  THE
  208.      BEGINNING  'C'  PROGRAMMER  AND  LOW-LEVEL  CONTROL  FOR THE 
  209.      ADVANCED PROGRAMMER. 
  210.      
  211.      REGISTRATION IS $49. PLUS $3. SHIPPING. REGISTERING ENTITLES
  212.      YOU  TO  RECEIVE THE LATEST VERSION OF ALL JJB SOFTWARE, THE
  213.      JJB MANUAL (THE COMPLETE PRINTED DOCUMENTATION), SOURCE CODE
  214.      WITH  COMMENTS  FOR  ALL  INPUT  AND  ENTER  FUNCTIONS, FREE
  215.      TECHNICAL SUPPORT, AND THE JJB NEWSLETTER.
  216.      
  217.  
  218.  
  219. ====================================================================== 
  220. *** Where did the idea of JJB for 'C' come from ?                  ***
  221. ----------------------------------------------------------------------
  222. ***     From a 1988 INCOME TAX PACKAGE written in FORTH.           ***
  223. ======================================================================
  224.      
  225.      
  226.      JJB  FOR 'C' PROGRAMMERS  REPRESENTS THE BEST OF WHAT I KNOW
  227.      AND WHAT I HAVE PROGRAMMED SINCE I WROTE THE FIRST  ASSEMBLY
  228.      LANGUAGE  TRACE,  STEP, BREAKPOINT DEBUGGER FOR THE APPLE II
  229.      COMPUTER IN 1979. IT WAS KNOWN AS "JOHN'S DEBUGGER" AND SOLD
  230.      THOUSANDS OF COPIES IN THE US, JAPAN AND WORLDWIDE. FOR SOME
  231.      REASON THE JAPANESE LIKED IT A LOT.
  232.      
  233.      MY  NEXT  MAJOR  PRODUCT  WAS  AN  ASSEMBLY LANGUAGE GENERAL
  234.      LEDGER PACKAGE FOR THE APPLE II COMPUTER. I HAD WORKED  WITH
  235.      HUNDREDS  OF  COMPUTERIZED  ACCOUNTING  SYSTEMS AS A CPA AND
  236.      NEVER  FOUND  ONE  I  LIKED, SO I WROTE ONE TO BE SUPER FAST
  237.      AND MARKETED IT WORLDWIDE. I THINK IT IS STILL  THE  FASTEST
  238.      GENERAL  LEDGER  AVAILIABLE FOR THE APPLE II TODAY. MY USERS
  239.      ARE VERY LOYAL AND CALL ME ALL THE TIME JUST TO CHAT.
  240.      
  241.      IN 1983 I SWITCHED FROM ASSEMBLY LANGUAGE TO FORTH.  ALL  MY
  242.      ASSEMBLY LANGUAGE ROUTINES HAD TO BE REWRITTEN IN FORTH. FOR
  243.      THOSE OF YOU WHO DON'T KNOW, WHEN YOU  WRITE  IN  FORTH  YOU
  244.      HAVE  TO  RE-INVENT THE WHEEL SO TO SPEAK. SINCE THEN I HAVE
  245.      WRITTEN EIGHT SOFTWARE PRODUCTS IN FORTH FOR THE IBM PC, XT,
  246.      AND AT. ALL OF WHICH RUNS ON EVERY  IBM  AND  COMPATIBLE.  I
  247.      HAVE NOT ENCOUNTERED A COMPATIBLE COMPUTER WHICH IT DOES NOT
  248.      RUN ON.
  249.      
  250.      THE  IDEA  FOR  'JJB'  CAME  TO  ME  LAST  YEAR WHEN I DID A
  251.      COMPLETE  1040 INCOME TAX PACKAGE IN FORTH. FROM ANY LINE ON
  252.      ANY FORM, THE USER HAD TO BE ABLE TO GO DIRECTLY TO ANY LINE
  253.      ON ANY  OTHER  FORM,  INSTANTLY.  FORMS  WERE  AUTOMATICALLY
  254.      INITALIZED OR READ, AND UPDATED UPON EXITING.
  255.      
  256.      IN  1988  I  CONVERTED  MY  FORTH  ROUTINES  TO   'C'.   THE
  257.      LANGUAGES  ARE  VERY  SIMILIAR.  IN  DOING  SO  I  WANTED AN
  258.      EXTREMELY HIGH-LEVEL PROGRAMMING ENVIRONMENT  WITH  ABSOLUTE
  259.      LOW-LEVEL  CONTROL.  THE RESULT IS 'JJB 1.2'. I AM CURRENTLY
  260.      WORKING ON JJB LA (LARGE APPLICATION) WHICH SHOULD BE  READY
  261.      FOR RELEASE SOON.
  262.                                  
  263.      
  264.                                        JOHN JAMES BRODERICK      
  265.  
  266.  
  267. =====================================================================
  268. ***   SUMMARY OF DOCUMENTATION, INSTALLATION, and REGISTRATION    ***
  269. =====================================================================
  270.  
  271. This  file  and  the  files listed below, document JJB 1.2 explaining
  272. what it does and how to use it. The JJBSHOW files  provide  you  with
  273. more  information  so  you  can  begin  programming with JJB. The two
  274. header files JJBKBD.H and JJBSET.H give you  even  more  documention.
  275. You  can print them all with the .bat file 'JJBPRINT.BAT' from DOS by
  276. entering: 'JJBPRINT'
  277.  
  278.                JJB-READ.DOC
  279.                JJBKBD.H
  280.                JJBSET.H
  281.                JJBSHOW1.C
  282.                JJBSHOW2.C
  283.                JJBSHOW3.C
  284.                JJBSHOW4.C
  285.                JJBSHOW5.C
  286.  
  287.  
  288. Installing  JJB  is  easy. Basically you just place the diskette with
  289. the JJB files in drive a: and enter one of the four DOS commands:
  290.  
  291.           JJBQC-LI      (Quick C learning installation)
  292.           JJBQC-FI      (Quick C final    installation)
  293.           JJBTC-LI      (Turbo C learning installation)
  294.           JJBTC-FI      (Turbo C final    installation)
  295.  
  296.  
  297. All of this is explained is detail further down in  this  file.  This
  298. is just a summary here to show you how easy it is.
  299.  
  300. Two   installation   methods   are  provided.  One  is  the  learning
  301. installation,  the  other  is  the  final  installation. Both are the
  302. same except the final installation  only moves files to the hard disk
  303. which are necessry for programming with JJB.
  304.  
  305. Installation is designed so you do not  have  to  create  a  separate
  306. directory  for  JJB. Every JJB filename begins with the three letters
  307. 'JJB'. All JJB files can easily be removed from  any  directory  with
  308. the following DOS command: 'JJBREMOV'
  309.  
  310.  
  311. -------------- JJB MANUAL (THE PRINTED DOCUMENTATION) ---------------
  312.  
  313. A  manual is available and will be sent to you if you register. It is
  314. the tenth manual I have written and sometimes I think it is harder to
  315. write the manual then it is to write the software. If you  think  the
  316. manual will be the same as this  documentation,  not  so.  Both  were
  317. written  separately  without  referring  to  each  other so that each
  318. compliments and adds to the other.
  319.  
  320. Those  who  register  will also receive the latest version of all JJB
  321. software, the complete source code with comments for  all  the  input
  322. and enter functions, free technical support, and the JJB newsletter.
  323.  
  324.  
  325.  
  326.  
  327. =========================================================================
  328. ***                           JJB FILES                               ***
  329. =========================================================================
  330.  
  331.  
  332.     JJB-READ.DOC    (THIS FILE                                          )
  333.     JJB-FORM.DOC    (REGISTRATION FORM                                  )
  334.     JJBFILES.DOC    (LIST OF ALL JJB FILES                              )
  335.     JJBINSTL.DOC    (HOW TO INSTALL JJB FOR QUICK C & TURBO C           )
  336.     JJBPRINT.BAT    (PRINTS ALL JJB FILES WHICH HAVE DOCUMENTATION      )
  337.  
  338.     JJB.EXE         (A DEMO-IF YOU CAN DEMO A PROGRAMMING ENVIRONMENT   )
  339.     JJBSHOW5.EXE    (EXECUTABLE FILE OF SOURCE FILE 'JJBSHOW5.C'        )
  340.     
  341.     JJBKBD.H        (HEADER FILE FOR KEYBOARD DEFINITIONS               )
  342.     JJBSET.H        (HEADER FILE FOR GET & SET DEFINITIONS              )
  343.     
  344.     JJBQC-LI.BAT    (.BAT FILE FOR QUICK C LEARNING INSTALLATION        )
  345.     JJBQC-FI.BAT    (.BAT FILE FOR QUICK C FINAL INSTALLATION           ) 
  346.     JJBTC-LI.BAT    (.BAT FILE FOR TURBO C LEARNING INSTALLATION        )
  347.     JJBTC-FI.BAT    (.BAT FILE FOR TURBO C FINAL INSTALLATION           ) 
  348.     JJBREMOV.BAT    (.BAT FILE FOR REVERSE INSTALLATION REMOVING FILES  )
  349.  
  350.     JJBQC.OBJ       (QUICK C OBJECT FILE FOR JJB INPUT & ENTER FUNCTIONS)
  351.     JJBQCINP.OBJ    (QUICK C OBJECT FILE FOR JJB INPUT & ENTER FUNCTIONS)
  352.     JJBQCDOL.OBJ    (QUICK C OBJECT FILE FOR JJB INPUT DOLLAR FUNCTIONS ) 
  353.     JJB.QLB         (QUICK C JJB LIBRARY CREATED WHEN INSTALLED         )
  354.  
  355.     JJBTC.OBJ       (TURBO C OBJECT FILE FOR JJB                        )
  356.     JJBTCINP.OBJ    (TURBO C OBJECT FILE FOR JJB INPUT & ENTER FUNCTIONS)
  357.     JJBTCDOL.OBJ    (TURBO C OBJECT FILE FOR JJB INPUT DOLLAR FUNCTIONS )
  358.     
  359.     JJBSHOW1.C      (TURBO C AND QUICK C  SAMPLE PROGRAM                )
  360.     JJBSHOW2.C      (TURBO C AND QUICK C  SAMPLE PROGRAM                )
  361.     JJBSHOW3.C      (TURBO C AND QUICK C  SAMPLE PROGRAM                )
  362.     JJBSHOW4.C      (TURBO C AND QUICK C  SAMPLE PROGRAM                )
  363.     JJBSHOW5.C      (TURBO C AND QUICK C  SAMPLE PROGRAM                )
  364.     
  365.     JJBQCS1.BAT     (QUICK C .BAT FILE TO LOAD JJBSHOW1 WITH JJB.QLB    )
  366.     JJBQCS2.BAT     (QUICK C .BAT FILE TO LOAD JJBSHOW2 WITH JJB.QLB    )
  367.     JJBQCS3.BAT     (QUICK C .BAT FILE TO LOAD JJBSHOW3 WITH JJB.QLB    )
  368.     JJBQCS4.BAT     (QUICK C .BAT FILE TO LOAD JJBSHOW4 WITH JJB.QLB    )
  369.     JJBQCS5.BAT     (QUICK C .BAT FILE TO LOAD JJBSHOW5 WITH JJB.QLB    ) 
  370.  
  371.  
  372. JJB-READ.DOC
  373.  
  374.      The main documentation file for JJB.
  375.  
  376.  
  377. JJB-FORM.DOC
  378.  
  379.      This is the JJB registration form file. From  DOS,  you  can
  380.      print it by entering:  TYPE JJB-FORM.DOC > PRN:
  381.  
  382.  
  383. JJBFILES.BAT
  384.  
  385.      A list of all JJB files.
  386.  
  387.  
  388. JJBINSTL.BAT
  389.  
  390.      Explains how to install JJB. It is included in JJB-READ.DOC 
  391.  
  392.  
  393. JJBPRINT.BAT
  394.  
  395.      Use  this  bat  file  to  print  all  JJB  files  which have
  396.      documentation.
  397.  
  398.  
  399. JJB.EXE
  400. JJBSHOW5.EXE
  401.  
  402.      These are demo files. It  is  hard  to  demo  a  programming
  403.      environment and it probably should not be done; but I wanted
  404.      to include something to show you what JJB can do. The source
  405.      for  JJBSHOW5.EXE  is in file JJBSHOW5.C. Both of these were
  406.      compiled with Quick C. If compiled with Turbo C  they  would
  407.      run a lot faster.
  408.      
  409.  
  410. JJBKBD.H
  411. JJBSET.H
  412.  
  413.      In  every  program  you  write  with JJB, you should include
  414.      these two files as shown below:
  415.      
  416.                 #include <jjbkbd.h>
  417.                 #include <jjbset.h> 
  418.      
  419.      The  JJB  installation  .bat  files  will  move  them to the
  420.      \include directory for you when you do a learning  or  final
  421.      installation.
  422.  
  423.  
  424. JJBQC-LI.BAT 
  425.           
  426.      This file installs the learning  installation  for  Quick  C
  427.      programmers.  See the section in this file entitled 'QUICK C
  428.      LEARNING INSTALLATION'.
  429.  
  430. JJBQC-FI.BAT 
  431.      This file installs the learning  installation  for  Quick  C
  432.      programmers.  See the section in this file entitled 'QUICK C
  433.      FINAL INSTALLATION'.
  434.  
  435.           
  436.  
  437. JJBTC-LI.BAT 
  438.           
  439.      This file installs the learning  installation  for  Turbo  C
  440.      programmers.  See the section in this file entitled 'TURBO C
  441.      LEARNING INSTALLATION'.
  442.      
  443.  
  444. JJBTC-FI.BAT 
  445.           
  446.      This file installs the learning  installation  for  Turbo  C
  447.      programmers.  See the section in this file entitled 'TURBO C
  448.      FINAL INSTALLATION'.
  449.      
  450.  
  451. JJBREMOV.BAT
  452.      
  453.      Use this .bat file to remove all JJB files from drive c: and
  454.      do a reverse installation.
  455.  
  456.  
  457. JJBQC.OBJ
  458.      
  459.      This is the main JJB 1.2 object file. The code is very tight
  460.      and  it  was  compiled  with  Quick C using only two include
  461.      files: 'dos.h' and 'setjmp.h'. 
  462.      
  463.      The same source file was used for both Quick C and Turbo  C,
  464.      however  they were compiled separately to ensure that you do
  465.      not have any problems with compatibility.
  466.      
  467.      
  468.  
  469. JJBTC.OBJ
  470.      
  471.      This is the main JJB 1.2 object file. The code is very tight
  472.      and  it  was  compiled  with  Turbo C using only two include
  473.      files: 'dos.h' and 'setjmp.h'.
  474.      
  475.      The  same source file was used for both Quick C and Turbo C,
  476.      however they were compiled separately to ensure that you  do
  477.      not have any problems with compatibility.
  478.  
  479.  
  480. JJBQCINP.OBJ
  481. JJBTCINP.OBJ
  482.      
  483.      These are the object files for the JJB 'input(' and 'enter('
  484.      functions.
  485.      
  486.      The same source file was used for both Quick C and Turbo  C,
  487.      however  they were compiled separately to ensure that you do
  488.      not have problems of compatibility.
  489.      
  490.      You  will  receive  the  complete  source  code  along  with
  491.      comments when you register with JJB.
  492.  
  493.  
  494. JJBQCDOL.OBJ
  495. JJBTCDOL.OBJ
  496.  
  497.      These  are  the  object  files  the  JJB 'input_dollar(' and
  498.      'enter_dollar(' functions.
  499.      
  500.      The  same source file was used for both Quick C and Turbo C,
  501.      however they were compiled separately to ensure that you  do
  502.      not have problems of compatibility.
  503.      
  504.      You  will  receive  the  complete  source  code  along  with
  505.      comments when you register with JJB.
  506.      
  507.  
  508. JJBSHOW1.C
  509. JJBSHOW2.C
  510. JJBSHOW3.C
  511. JJBSHOW4.C
  512. JJBSHOW5.C
  513.      
  514.      These are sample source files for both Turbo C and Quick  C.
  515.      In Turbo C you can just load them like any other source file
  516.      after  you  install  JJB. In Quick C, you should include the
  517.      JJB  Quick  Library  file  JJB.QLB (qc /l JJB.QLB jjbshow.c)
  518.      when loading or you can use the .bat  files  below  designed
  519.      only for Quick C loading of JJBSHOW files.
  520.      
  521.  
  522. JJBQCS1.BAT
  523. JJBQCS2.BAT
  524. JJBQCS3.BAT
  525. JJBQCS4.BAT
  526. JJBQCS5.BAT
  527.      
  528.      To load the source file JJBSHOW1.C in  Quick  C,  enter  the
  529.      following  from DOS: JJBQCS1. Do the same for the other show
  530.      files.
  531.      
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538. QUICK C
  539. ======================================================================
  540. ***      JJB LEARNING INSTALLATION FOR QUICK C PROGRAMMERS        ***
  541. ====================================================================== 
  542.      
  543.      Place the floppy diskette in drive a: and enter: JJBQC-LI
  544.      
  545.      It will:
  546.      
  547.        1. Move all files to the hard disk drive c:
  548.                   jjbkey.h and jjbset.h to c:\include
  549.                   All the rest to c:\bin
  550.        2. Creates the JJB quick library JJB.QLB
  551.                   and load the first show file with JJBQCS1.
  552.      
  553.      You  may  have  noticed  that  JJB tried to delete two files
  554.      which it could not find on the disk drive. That is  the  way
  555.      it should work because Quick C does not like to make a quick
  556.      library  if the file already  exists  on the disk drive.
  557.      
  558.      You should now be in Quick C  looking  at  the  sample  file
  559.      JJBSHOW1.C.  If  you now press 'F5', the file should compile
  560.      and execute.
  561.      
  562.      If you need to exit Quick C, press 'ALT,' 'RETURN', 'X'. 
  563.      
  564.      To re-enter the source file, from DOS enter 'JJBQCS1'.
  565.      
  566.      To  compile  and  execute  'JJBSHOW1.C'  from   DOS   enter:
  567.               C:\BIN>JJBQCS1, then press 'F5'.
  568.      
  569.      You  can  load  any  of  the  five  source examples with the
  570.      following commands from DOS:
  571.      
  572.                      JJBQCS1
  573.                      JJBQCS2
  574.                      JJBQCS3
  575.                      JJBQCS4
  576.                      JJBQCS5
  577.      
  578.      
  579.      To remove all JJB files from drive c: enter: 'JJBREMOV'
  580.      
  581.      This deletes all the JJB files from drive c: doing a reverse
  582.      installation.
  583.  
  584.  
  585. QUICK C
  586. ======================================================================
  587. ***        JJB FINAL INSTALLATION FOR QUICK C PROGRAMMERS          ***
  588. ====================================================================== 
  589.      
  590.      The purpose of this installation is to install only the  JJB
  591.      files which are necessary for Quick C programming.
  592.      
  593.      The files are:  JJBKBD.H
  594.                      JJBSET.H
  595.                      JJBQC.OBJ
  596.                      JJBQCINP.OBJ
  597.                      JJBQCDOL.OBJ
  598.      
  599.      Place the JJB diskette in drive a: and enter: 'JJBQC-FI'
  600.      
  601.      Don't forget to delete all JJB files  from  your  hard  disk
  602.      before  you  make the final installation. The entire purpose
  603.      of the final installation is to clean up your hard disk.  So
  604.      please   remove   the   files   as  shown  in  the  learning
  605.      installation.
  606.      
  607.      
  608.      
  609. TURBO C 
  610. ======================================================================
  611. ***      JJB LEARNING INSTALLATION FOR TURBO C PROGRAMMERS        ***
  612. ====================================================================== 
  613.      
  614.      Place the floppy diskette in drive a: and enter: JJBTC-LI
  615.      
  616.      It will:
  617.      
  618.        1. Move all files to the hard disk drive c:
  619.                   jjbkey.h and jjbset.h to c:\tc\include
  620.                   All the rest to c:\tc
  621.        2. Add the object modules to the small library
  622.                   and load the first show file JJBSHOW1.C
  623.      
  624.      You  should  now be in Turbo C and can execute the show file
  625.      by pressing CTRL F9.
  626.      
  627.      
  628.      To remove all JJB files from drive c: enter: 'JJBREMOV'
  629.      
  630.      This deletes all the JJB files from drive c: doing a reverse
  631.      installation.
  632.  
  633.      
  634.      
  635.  
  636. TURBO C
  637. ======================================================================
  638. ***        JJB FINAL INSTALLATION FOR TURBO C PROGRAMMERS          ***
  639. ====================================================================== 
  640.      
  641.      The purpose of this installation is to install only the  JJB
  642.      files which are necessary for Quick C programming.
  643.      
  644.      The files are:  JJBKBD.H
  645.                      JJBSET.H
  646.                      JJBTC.OBJ
  647.                      JJBTCINP.OBJ
  648.                      JJBTCDOL.OBJ
  649.      
  650.      Place the JJB diskette in drive a: and enter: 'JJBTC-FI'
  651.      
  652.      Don't forget to delete all JJB files  from  your  hard  disk
  653.      before  you  make the final installation. The entire purpose
  654.      of the final installation is to clean up your hard disk.  So
  655.      please   remove   the   files   as  shown  in  the  learning
  656.      installation.
  657.      
  658.      
  659.      
  660.  
  661.  
  662.  
  663. =====================================================================
  664. ***                  LIST OF JJB FUNCTIONS                        ***
  665. =====================================================================
  666.  
  667.  
  668. FUNCTIONS TO USE IN main():
  669.  
  670.    jjb_initalize()         initalizes JJB
  671.    jjb_setup()             set up your program groups and options
  672.    jjb_start()             start executing your program functions
  673.  
  674.  
  675. FUNCTIONS TO USE IN jjb_setup():
  676.  
  677.    group("string")         begin setting up a group of options
  678.    option("string F4")     assign description & funct. key to option
  679.    funct(functionname)     assign a function name to an option
  680.    default_opt()           uses last option set up for default option
  681.    init(functionname)      assign for initalizing group or option
  682.    leave(functionname)     assign for exiting group or option
  683.    help(functionname)      assign a function name to help
  684.    dosexit(functionname)   execute this function when exiting to DOS
  685.  
  686.  
  687. KEYBOARD FUNCTIONS (low to high level):
  688.  
  689.    clrkeys()               clear keyboard
  690.    read_kcode()            read keyboard scan code
  691.    kbint()                 the keyboard interrupt JJB uses
  692.    keyp(type)              read keyboard according to type
  693.    keypress(type)          reads from string or from keyboard
  694.    get_c(type)             handles 'Was ALT pressed?'
  695.    get_ch()                the high-level 'getch()' to use
  696.    get_num()               do not allow alpha keypresses
  697.    get_any()               return if user pressed a key
  698.    store_keys("string")    store string for keyboard to read
  699.    
  700.  
  701. VIDEO FAST 'VF' FUNCTIONS:
  702.  
  703.    bright()                make color bright
  704.    getvoff()               return video offset 0-1999
  705.    normal()                change color setting to the normal color
  706.    reverse()               change color setting to the reverse color
  707.    setvoff(voffset)        set video offset to number 0-1999
  708.    set_color(WHITE ONBLUE) high-level set color function to use
  709.    underline()             change color setting to the underline color
  710.    va(RED ONBLACK)         set video attribute to any color on any color
  711.    vbl()                   return 'vf' offset for beginning of row
  712.    vbout(ch)               display byte in bits 1111 1111
  713.    vch(ch,voffset)         put char on video at video offset 0-1999
  714.    vclr_screen()           clear entire screen
  715.    vclreol()               clear to end of line
  716.    vclrft(fromrow,torow)   clear screen from one row to row
  717.    vclrw()                 clear main window depending on VCLRW_SW
  718.    vcr()                   do one 'vf' carriage return
  719.    vcrs(x)                 do x number of 'vf' carriage returns
  720.    vfc(ch)                 put out 'vf' character at video offset
  721.    vfcc(ch)                same as above except place actual cursor after
  722.    vfi(x)                  'vf' an integer at the video offset
  723.    vfir(x,length)          'vf' integer right justified in field
  724.    vfs("string")           'vf' string at video offset
  725.    vfsc("cursor after")    same as above except put cursor after
  726.    vfsdo("string",down,over) string out & set 'vf' cursor down & over
  727.    vfsl("str out left",fld)  'vf' string left justified in field
  728.    vftout(char,x)          'vf' char x times out
  729.    vfw(r,c,d,w)            makes a super fast window
  730.    vgrid()                 programmer's grid ^G from any keypress
  731.    vinit_screen()          initalize direct memory video access
  732.    vloc(row,column)        set video offset for all 'vf'
  733.    vr(x)                   return screen char with attribute at x video offset
  734.    vrc(voffset)            video restore character from JJB save buffer
  735.    vrest_scr(&array[0])    restore screen from your int array 
  736.    vrest_screen()          restore screen from JJB array
  737.    vsave_scr(&array[0])    save screen in your int array
  738.    vsave_screen()          save screen in JJB int array
  739.    vspace()                video fast one space 
  740.    vspaces(x)              video fast x spaces
  741.    
  742.  
  743. OTHER FUNCTIONS:
  744.  
  745.    between(x,from,to)      return true if x is = or betw. from/to
  746.    cf()                    copyright function initalizing all options
  747.    dspopt()                displays option for pull-down window
  748.    getcoff()               return cursor position as num 0-1999
  749.    gop()                   get no. of current option executing.
  750.    sop()                   sets option to execute at next keypress
  751.    jdelay(x)               the JJB delay routine
  752.    jsel()                  displays top selection row
  753.    jbot()                  displays bottom selection row
  754.    len("string")           returns length of string
  755.    loc(row,column)         locates actual cursor for printf(
  756.    nbetween(x,from,to)     return true if x is not = or betw. from/to
  757.    nf()                    null function for initalizing & exiting 
  758.    pak()                   returns address of global "Press any key "
  759.    set(UPPER_SW,T)         example of setting a switch, see JJBSET.H
  760.    setc(KEY,'A')           example of setting char in char array
  761.    setcoff(offset)         set cursor as number from 0-1999
  762.    strcopy("asdf",str_ptr) just a string copy function
  763.  
  764.  
  765.  
  766.  
  767.  
  768. =====================================================================
  769. ***                 JJB GLOSSARY OF FUNCTIONS                     ***
  770. =====================================================================
  771.  
  772.  
  773. ---------------------------------------------------------------------
  774. int between(x,from,to)                                       between(
  775. ---------------------------------------------------------------------
  776.  
  777. int x;                integer testing
  778. int from;             from range
  779. int to;               to range
  780.  
  781. This  function  returns  a  true  if  integer  x is equal to or falls
  782. between the from/to range. 
  783.  
  784.  
  785. Example:    if ( between(x,1,12) ) dosomething();
  786.  
  787.  
  788.  
  789. ---------------------------------------------------------------------
  790. void bright(void)                                             bright(
  791. ---------------------------------------------------------------------
  792.  
  793. The bright() function turns on the bright bit for for 'vf' functions.
  794.  
  795. Example:
  796.  
  797.                 bright();
  798.                 vfs("This will be brighter. ");
  799.                 normal();
  800.                 vfs("This will appear in the normal color.");
  801.  
  802. The bright() function turns on the bright bit for the video attribute
  803. currently being used.  It  handles  for  both  monochrome  and  color
  804. monitors. To turn it off use  the  normal()  function  or  any  other
  805. function which changes the video attribute.
  806.  
  807.  
  808. ---------------------------------------------------------------------
  809. void cf(void)                                                     cf(
  810. ---------------------------------------------------------------------
  811.  
  812. The  'cf()'  function  is  used  by jjb_initalize() to initalize each
  813. option with a null copyright function. In jjb_setup() you can set  up
  814. options without assigning functions to them. The options that are not
  815. assigned will execute this function.
  816.  
  817.  
  818. ---------------------------------------------------------------------
  819. void clrkeys(void)                                           clrkeys(
  820. ---------------------------------------------------------------------
  821.  
  822. This  function  clears  the  eight variables which were sent when the
  823. last key was read from the keyboard. The variables are KE, KEU,  KEE,
  824. KCODE, IKE, IKEU, IKEE, IKCODE as explained in file: JJBKBD.H.
  825.  
  826.  
  827. ---------------------------------------------------------------------
  828. void default_opt(void)                                   default_opt(
  829. ---------------------------------------------------------------------
  830.  
  831. This  function allows you to assign any option as the default option.
  832. Place it after the 'option(' function in jjb_setup(). If  you  assign
  833. more than one option as the default option, JJB  will  only  use  the
  834. last one assigned. 
  835.  
  836. It is nice to to be able to immediately start  testing  the  function
  837. you  are  programming.  As  you  are writing your program, place this
  838. function after the option you want to test. Execution will start with
  839. the option.
  840.  
  841. Use this function only in jjb_setup(). For examples see source  files
  842. JJBSHOW1.C through JJBSHOW5.C.
  843.  
  844.  
  845. ---------------------------------------------------------------------
  846. void dosexi(void)                                             dosexi(
  847. ---------------------------------------------------------------------
  848.  
  849. This  is  the function JJB executes when you press ALT X to exit your
  850. program. You can disable it in jjb_setup() by setting  the  following
  851. switch to true as such: set(ALTXOFF_SW,T);
  852.  
  853. Once disabled, ALT X will not exit your program.
  854.  
  855. Most  program  ask  a  question  before exiting. You can activate the
  856. question by setting this switch in jjb_setup(): set(ALTXSURE_SW,T);
  857.  
  858. Pressing ALT X should then show the following question in the  bottom
  859. left-hand corner of the screen:
  860.  
  861.  
  862.                   'DOS exit. Are you sure Y/N ?'
  863.  
  864. Press  'Y'  for yes to exit and 'N' for no, do not exit but return to
  865. the function you were executing.
  866.  
  867.  
  868. ---------------------------------------------------------------------
  869. void dosexit(*funcptr)                                       dosexit(
  870. ---------------------------------------------------------------------
  871.  
  872. If you have a function you want executed when leaving the program use
  873. this function to assign it in jjb_setup(). Here is an example:
  874.  
  875.    my_exit() {
  876.                any code here
  877.  
  878.       }
  879.  
  880.    jjb_setup() {
  881.  
  882.               dosexit(my_exit);
  883.  
  884.       }
  885.  
  886.  
  887. ---------------------------------------------------------------------
  888. void funct(*funcptr)                                           funct(
  889. ---------------------------------------------------------------------
  890.  
  891. Every  option you set up in jjb_setup() should eventually be assigned
  892. a function. Use 'funct(' to assign.
  893.  
  894. All  options are initalized by jjb_initalize() with the null function
  895. 'vff()' displaying the JJB copyright notice.
  896.  
  897. Use this function only in jjb_setup(). For examples see source  files
  898. JJBSHOW1.C through JJBSHOW5.C.
  899.  
  900.  
  901. ---------------------------------------------------------------------
  902. int getcoff(void)                                            getcoff(
  903. ---------------------------------------------------------------------
  904.  
  905. 'getcoff' is  short  for  GET  CURSOR  OFFSET.  The  offset  returned
  906. will  be  an  integer  from 0 to 1999. This is a very useful function
  907. when you want to save the cursor position and then reset it later.
  908.  
  909. Here is an example of saving and resetting the cursor position:
  910.  
  911.                 int save_cursor;
  912.         1       save_cusror = getcoff();  /* save physical cursor  */
  913.  `              any code here
  914.                 setcoff(save_cursor);     /* reset physical cursor */
  915.  
  916. In JJB there is an actual cursor seen on the screen and an  invisible
  917. 'vf'  cursor  for all the video fast functions. This function affects
  918. only the actual phyicsal cursor.
  919.  
  920.  
  921. ---------------------------------------------------------------------
  922. int getvoff(void)                                            getvoff(
  923. ---------------------------------------------------------------------
  924.  
  925. This function returns the video  offset  position  used  by  the  JJB
  926. functions.  The  number returned will be a number from 0-1999.
  927.  
  928. Here is an example of saving and resetting the video offset:
  929.  
  930.         int voffset;
  931.         voffset = getvoff(); /* save invisible 'vf' cursor    */
  932.         place any code here
  933.         setvoff(voffset);    /* restire 'vf' invisible cursor */
  934.  
  935.  
  936. ---------------------------------------------------------------------
  937. unsigned char get_c(type)                                      get_c(
  938. ---------------------------------------------------------------------
  939.  
  940. This is a low-level  keyboard  function  used  JJB  routines.  It  is
  941. explained in the complete printed documentation.
  942.  
  943.  
  944. ---------------------------------------------------------------------
  945. unsigned char get_any(void)                                  get_any(
  946. ---------------------------------------------------------------------
  947.  
  948. This function waits for you to press down on any key on the keyboard.
  949. It  is  unlike 'get_ch()' which will not return if you only press the
  950. capital locks or shift keys. 
  951.  
  952. Example:
  953.                 char ch;
  954.                 ch = get_any();
  955.                 if (RIGHTSHIFT_PRESSED)  do_something();
  956.  
  957. Once  more  thing.  JJB  is designed so that you do not have to worry
  958. about the character you just fetched from the keyboard. In the  above
  959. example, you could use 'get_any();' instead of 'ch = get_any();'.
  960.  
  961.  
  962. ---------------------------------------------------------------------
  963. unsigned char get_ch(void)                                    get_ch(
  964. ---------------------------------------------------------------------
  965.  
  966. This  is  the main keyboard function you should use in your programs.
  967. Do not use getch() unless you want to bypass the JJB environment. 
  968.  
  969. The  'get_ch()'  function  is a very high-level function. It can read
  970. internally  stored strings which you have defined with 'store_keys('.
  971. It can handle changing of options. In fact, it uses five  lower-level
  972. functions  in  the  following  order:   get_c(,   keypress(,   keyp(,
  973. kbint(, and read_kcode(. 
  974.  
  975.  
  976. ---------------------------------------------------------------------
  977. unsigned char get_num(void)                                  get_num(
  978. ---------------------------------------------------------------------
  979.  
  980. This function is the same as 'get_ch()' except  it  will  not  accept
  981. alpha-numeric keypresses.
  982.  
  983.  
  984. ---------------------------------------------------------------------
  985. unsigned int get(int)                                            get(
  986. ---------------------------------------------------------------------
  987.  
  988. This  function  returns the value of an integer which has been stored
  989. in the integer array. 
  990.  
  991. Instead  of  having  50  to  100 separate integers. JJB uses only one
  992. array which can easily be set or accessed from any object module. See
  993. header file jjbset.h for a list of all the elements in the array. The
  994. complete printed documentataion explains each element in the array.
  995.      
  996.  
  997. ---------------------------------------------------------------------
  998. unsigned char getc(int)                                         getc(
  999. ---------------------------------------------------------------------
  1000.  
  1001. This  function  is  the  same  as  'get('  except it gets a character
  1002. from the JJB character array. Many examples are show in file jjbset.h
  1003.  
  1004.  
  1005. ---------------------------------------------------------------------
  1006. int gop(void)                                                    gop(
  1007. ---------------------------------------------------------------------
  1008.  
  1009. This function returns the current  option  number.  Every  option  in
  1010. your  program  is  assigned  a number starting with 1. If you have 50
  1011. options, then this function can return a number up  to  50.  See  the
  1012. help( function for examples.
  1013.  
  1014.  
  1015. ---------------------------------------------------------------------
  1016. void gname_out(void)                                       gname_out(
  1017. ---------------------------------------------------------------------
  1018.  
  1019. This is a  low-level  function  used  by  the  JJB  routines.  It  is
  1020. explained in detail in the complete printed documentation.
  1021.  
  1022. ---------------------------------------------------------------------
  1023. void group(char *string)                                       group(
  1024. ---------------------------------------------------------------------
  1025.  
  1026. This   function   defines   a  group  by  assigning  it  a  character
  1027. description. It also starts the assignment of options to  the  group.
  1028. See the show files for many examples.
  1029.  
  1030.  
  1031. ---------------------------------------------------------------------
  1032. void group_heading(void)                               group_heading(
  1033. ---------------------------------------------------------------------
  1034.  
  1035. This is a  low-level  function  used  by  the  JJB  routines.  It  is
  1036. explained in detail in the complete printed documentation.
  1037.  
  1038.  
  1039. ---------------------------------------------------------------------
  1040. void help(*funcptr)                                             help(
  1041. ---------------------------------------------------------------------
  1042.  
  1043. You can assign a help function which can be called in your program by
  1044. pressing the F1 key. Here in an example:
  1045.  
  1046.  
  1047.    my_help() {
  1048.                  if (gop() == 1) { do help for option 1  }
  1049.                  if (gop() == 2) { do help for option 2  }
  1050.                  if (gop() == 3) { do help for option 3  }
  1051.                  if (gop() == 4) { do help for option 4  }
  1052.                  if (gop() == 5) { do help for option 5  }
  1053.       }
  1054.  
  1055.    jjb_setup() {
  1056.  
  1057.                help(my_help);
  1058.       }
  1059.  
  1060.  
  1061.  
  1062. ---------------------------------------------------------------------
  1063. void init(*functpr)                                             init(
  1064. ---------------------------------------------------------------------
  1065.  
  1066. Every  group and option may be initialized with a function. There are
  1067. many examples in the show files. 
  1068.  
  1069.  
  1070. ---------------------------------------------------------------------
  1071. void jbot(void)                                                 jbot(
  1072. ---------------------------------------------------------------------
  1073.  
  1074. This is a  low-level  function  used  by  the  JJB  routines.  It  is
  1075. explained in detail in the complete printed documentation.
  1076.  
  1077.  
  1078. ---------------------------------------------------------------------
  1079. void jdelay(int)                                              jdelay(
  1080. ---------------------------------------------------------------------
  1081.  
  1082. This  is  the  JJB  delay  function.  It  does  two loops, one inside
  1083. the another. The number sent it must be from 1 to 255.  If  not,  JJB
  1084. will correct it.
  1085.  
  1086.  
  1087.         jdelay(1)    does no delay.
  1088.         jdelay(2)    loops 4 times  (2 x 2)
  1089.         jdelay(5)    loops 25 times (5 x 5)
  1090.         jdelay(100)  loops 10,000 times (100 x 100)
  1091.         jdelay(255)  loops 65,250 times (255 x 255)
  1092.  
  1093. It  is a simple little delay routine which does not take much thought
  1094. to  operate.  Once  you  set the delay, it can continue with the same
  1095. delay as follows:
  1096.  
  1097.  
  1098.         delay(80);
  1099.         delay(SAME);
  1100.         delay(SAME);
  1101.         delay(SAME);
  1102.  
  1103. One more thing. JJB has the  ability  to  read  keys  from  a  stored
  1104. string.  If  not  slowed  down,  they will appear on the screen as if
  1105. they are being typed in. In order to slow them down every  'get_ch()'
  1106. executes a delay depending on the value KBDDEL.
  1107.  
  1108.      The fastest setting is  set(KBDDEL,1);
  1109.      The slowest setting is  set(KBDDEL,255);
  1110.  
  1111. Try this code and see what happens:
  1112.  
  1113.         store_keys("My name is John.!");
  1114.         set(KBDDEL,88);
  1115.         input(30);
  1116.  
  1117. The function 'input(30)' reads a string up to 30 characters in length
  1118. returning the address. In the above example we don't need the address
  1119. so it was ignored. The'!'  character  stands  for  the  'RETURN'  key
  1120. telling  the  input function that return has been pressed. The source
  1121. code for  all  input  and  enter  functions  is  available  only  for
  1122. registered users.
  1123.  
  1124.  
  1125. ---------------------------------------------------------------------
  1126. void jjb_initalize(void)                               jjb_initalize(
  1127. ---------------------------------------------------------------------
  1128.  
  1129. This function initalizes JJB direct memory access address, the arrays
  1130. and pointer, sets up the default color settings for the video mode in
  1131. use, plus many other things.
  1132.  
  1133. See  the main() function in this glossary and the show files for more
  1134. explanation.
  1135.  
  1136.  
  1137. ---------------------------------------------------------------------
  1138. void jjb_setup(void)                                       jjb_setup(
  1139. ---------------------------------------------------------------------
  1140.  
  1141. Use  this function to set up groups of options which JJB will execute
  1142. when it executes the function jjb_start().
  1143.  
  1144. For examples, see source  files JJBSHOW1.C through JJBSHOW5.C.
  1145.  
  1146.  
  1147. ---------------------------------------------------------------------
  1148. void jjb_start(void)                                       jjb_start(
  1149. ---------------------------------------------------------------------
  1150.  
  1151. This  function  is  a  processing  loop  which  executes your program
  1152. functions.  Whenever  you  select  a new option, JJB does a long jump
  1153. back to this loop executing the leave functions for  the  option  and
  1154. group, then it initalizes  the  new  group  and  option  and  finally
  1155. calls the option function.
  1156.  
  1157. This loop will be continued until  you  press  ALT  X  to  exit  your
  1158. program.  If  you are testing your program you can press CONTROL C or
  1159. CONTROL PAUSE to force an abort returning to QUICK C or TURBO C.
  1160.  
  1161. Further down in this file is a box which outlines the processing loop
  1162. that that function begins executing.
  1163.  
  1164.  
  1165. ---------------------------------------------------------------------
  1166. void jsel(void)                                                 jsel(
  1167. ---------------------------------------------------------------------
  1168.  
  1169. This is a  low-level  function  used  by  the  JJB  routines.  It  is
  1170. explained in detail in the complete printed documentation.
  1171.  
  1172.  
  1173. ---------------------------------------------------------------------
  1174. void kbint(void)                                               kbint(
  1175. ---------------------------------------------------------------------
  1176.  
  1177. This is a  low-level  function  used  by  the  JJB  routines.  It  is
  1178. explained in detail in the complete printed documentation.
  1179.  
  1180.  
  1181. ---------------------------------------------------------------------
  1182. void keyp(int type)                                             keyp(
  1183. ---------------------------------------------------------------------
  1184.  
  1185. This  is  a  low-level function used JJB routines. It is explained in
  1186. detail in the complete printed documentation.
  1187.  
  1188.  
  1189. ---------------------------------------------------------------------
  1190. void keypress(int type)                                     keypress(
  1191. ---------------------------------------------------------------------
  1192.  
  1193. This is a  low-level  function  used  by  the  JJB  routines.  It  is
  1194. explained in detail in the complete printed documentation.
  1195.  
  1196.  
  1197. ---------------------------------------------------------------------
  1198. void leave(*funcptr)                                           leave(
  1199. ---------------------------------------------------------------------
  1200.  
  1201. Every group and/or option can be exited with a  function.  There  are
  1202. many examples of this in the show files. 
  1203.  
  1204.  
  1205.  
  1206. ---------------------------------------------------------------------
  1207. loc(int row, int col)                                            loc(
  1208. ---------------------------------------------------------------------
  1209.  
  1210. Use this function to locate the physical cursor on the video monitor.
  1211. 'loc(1,1);' places the cursor in the  top  left-hard  corner  of  the
  1212. screen.  'loc(25,80);'  places  the  cursor  in  the bottom right-and
  1213. corner. 
  1214.  
  1215. You  can  also  use  the function 'setcoff(' to position the physical
  1216. cursor as in the following examples:
  1217.  
  1218.         setcoff(0)  is the same as  loc(1,1)
  1219.         setcoff(1999) is the same as loc(25,80)
  1220.  
  1221.  
  1222. ---------------------------------------------------------------------
  1223. void main(void)                                                 main(
  1224. ---------------------------------------------------------------------
  1225.  
  1226. This  is  the  main function in your program. Every program you write
  1227. using JJB should have a main function which looks like this:
  1228.  
  1229.     main() {
  1230.         jjb_initalize();  /* initalize JJB system                  */
  1231.         jjb_setup();      /* set up your program options           */
  1232.         jjb_start();      /* start executing your program functions*/
  1233.      }
  1234.  
  1235. You  do  not have to use all of the features of JJB. If you just want
  1236. to  use  some  of  the JJB functions, initalize JJB by making it your
  1237. first instruction in main. After initalization, you  can  use  almost
  1238. all of the functions explained in this glossary.
  1239.  
  1240.     main() {
  1241.                 jjb_initalize();
  1242.                 place your program code here
  1243.  
  1244.         }
  1245.                                                
  1246.  
  1247. ---------------------------------------------------------------------
  1248. int nbetween(x, from, to)                                   nbetween(
  1249. ---------------------------------------------------------------------
  1250.  
  1251. int x;                integer testing
  1252. int from;             from range
  1253. int to;               to range
  1254.  
  1255. This function returns a true condition if integer x is not  equal  to
  1256. or fall between the from/to range.
  1257.  
  1258. Example:    if ( nbetween(x,1,12) ) dosomething();
  1259.  
  1260.  
  1261. ---------------------------------------------------------------------
  1262. void nf(void)                                                     nf(
  1263. ---------------------------------------------------------------------
  1264.  
  1265. Each group and option  can be  initalized and exited  with a function
  1266. you can assign in jjb_setup().   If you do not assign one,   JJB will
  1267. execute this null function which does nothing.
  1268.  
  1269.  
  1270. ---------------------------------------------------------------------
  1271. void normal(void)                                             normal(
  1272. ---------------------------------------------------------------------
  1273.  
  1274. Use  'normal()' in your program when you want to change the attribute
  1275. to the normal color. This function properly handles  both  color  and
  1276. monochrome monitors.
  1277.  
  1278. This function resets the video  fast  'vf'  color  attribute  to  the
  1279. normal color attribute. On monochrome it is white on black (7).
  1280.  
  1281. The  normal  color  attribute  is set in jjb_initalize() as followed:
  1282. set(VNCOLOR, WHITE ONBLUE). It can be changed in jjb_setup()  to  any
  1283. color on any color as follows: set(VNCOLOR, BLACK ONBLUE);
  1284.  
  1285. The  JJB manual devotes an entire chapter on how easy it is to select
  1286. a color setting.
  1287.  
  1288.  
  1289. ---------------------------------------------------------------------
  1290. void option(char *,DRAWLINE)                                  option(
  1291. ---------------------------------------------------------------------
  1292.  
  1293. The  option  function  starts defining a new option by assigning it a
  1294. string of characters. 
  1295.  
  1296.         
  1297. examples:
  1298.  
  1299.    jjb_setup() {
  1300.         option("Copy File")
  1301.         option("Read 'F'ile",DRAWLINE);
  1302.         option("Write File    F8")
  1303.  
  1304.    }
  1305.  
  1306. In the first example above, we did not specify which  letter  to  use
  1307. for  selection  so JJB will use the first letter. If the first letter
  1308. was used by a previous option, then JJB will use  the  second  letter
  1309. and so on.
  1310.  
  1311. In the second example we specified 'F' to be the selection letter.
  1312.  
  1313. You  can  assign  to  any option the function keys F2 thru F9 by just
  1314. placing it in the description at the end. Notice that the ',DRAWLINE'
  1315. is optional and should be used only when you what  to  separate  this
  1316. option from the next one.
  1317.  
  1318. After   'option('   you   can   use   'funct(',   'init(',  'leave(',
  1319. default_opt(' in any order.
  1320.  
  1321.  
  1322. ---------------------------------------------------------------------
  1323. char *pak(void)                                                  pak(
  1324. ---------------------------------------------------------------------
  1325.  
  1326. The  'pak()' function returns the global address of "Press any key ".
  1327. The following will video it on the screen and wait for a keypress:
  1328.  
  1329.                    vfs( pak() );
  1330.                    get_ch();
  1331.  
  1332. It is the same as: char ch;
  1333.                    printf("Press any key ");
  1334.                    ch = getch();
  1335.  
  1336.  
  1337. ---------------------------------------------------------------------
  1338. void read_kcode(void)                                     read_kcode(
  1339. ---------------------------------------------------------------------
  1340.  
  1341. This is a  low-level  function  used  by  the  JJB  routines.  It  is
  1342. explained in detail in the complete printed documentation.
  1343.  
  1344.  
  1345. ---------------------------------------------------------------------
  1346. void reverse(void)                                           reverse(
  1347. ---------------------------------------------------------------------
  1348.  
  1349. Use 'reverse()' in your program when you want to change the attribute
  1350. to the reverse color. This function properly handles both  color  and
  1351. monochrome monitors.
  1352.  
  1353. This function resets the video  fast  'vf'  color  attribute  to  the
  1354. reverse color attribute. On monochrome it is black on white (112). 
  1355.  
  1356. The reverse color attribute is set in  jjb_initalize()  as  followed:
  1357. set(VRCOLOR,  BLUE  ONWHITE). It can be changed in jjb_setup() to any
  1358. color on any color as follows: set(VRCOLOR, RED ONWHITE);
  1359.  
  1360.  
  1361. ---------------------------------------------------------------------
  1362. void set(int offset, int value)                                  set(
  1363. ---------------------------------------------------------------------
  1364.  
  1365. This function sets the value of an integer which has been  stored  in
  1366. the  JJB integer array. Instead of having 50 to 100 separate integers
  1367. to handle JJB, it uses only one integer array which can easily be set
  1368. or accessed from any object module. 
  1369.  
  1370. See  jjbset.h  file  for  a  list  of  the elements in the array. The
  1371. complete  printed  documentataion  explains each element in the array
  1372. and what it does.
  1373.  
  1374.  
  1375. ---------------------------------------------------------------------
  1376. void set_color(unsigned int color)                         set_color(
  1377. ---------------------------------------------------------------------
  1378.  
  1379. This is a high-level function which allows you to  change  the  color
  1380. setting.
  1381.  
  1382. Examples:     set_color(BLACK ONRED);
  1383.               set_color(BLUE ONWHITE);
  1384.  
  1385. You  can  set  the color to any color on any color. When your program
  1386. runs, if the user of your program has a monochrome, then  the  change
  1387. will not be made.
  1388.  
  1389.  
  1390. ---------------------------------------------------------------------
  1391. void setcoff(int)                                            setcoff(
  1392. ---------------------------------------------------------------------
  1393.  
  1394. 'setcoff' is short for  SET  CURSOR  OFFSET.  Use  this  function  to
  1395. set the physical cursor anywhere on the  screen.  It  does  the  same
  1396. as the 'loc(' function except it uses only one integer amount for the
  1397. offset instead of a row and a column.
  1398.  
  1399. The number you send it must be between 0 and 1999.
  1400.  
  1401. setcoff(82) will place the cursor on row 2, column 3.
  1402.  
  1403. Here is an example of saving and resetting the cursor position:
  1404.  
  1405.                 int save_cursor;
  1406.                 save_cusror = getcoff();
  1407.  `              any code here
  1408.                 setcoff(save_cursor);
  1409.  
  1410.  
  1411.  
  1412. ---------------------------------------------------------------------
  1413. void setvoff(int)                                            setvoff(
  1414. ---------------------------------------------------------------------
  1415.  
  1416. This function sets the video fast 'vf' invisible video offset cursor.
  1417. It should always be a number from 0 to 1999.
  1418.  
  1419. Here is an example of saving and resetting the video offset:
  1420.  
  1421.                 int voffset;
  1422.                 voffset = getvoff();   /* save video offset    */
  1423.                 any code here
  1424.                 setvoff(voffset);      /*  reset video offset  */
  1425.  
  1426. The  video  offset can also be set with the 'vloc(' function. Both do
  1427. the same thing except 'setvoff(' does it with only one integer and is
  1428. much faster because there is no calculation to make.
  1429.  
  1430.  
  1431. ---------------------------------------------------------------------
  1432. void store_key(char *pointer)                             store_keys(
  1433. ---------------------------------------------------------------------
  1434.  
  1435. The 'store_keys(' function allows you to internally store a string of
  1436. characters to be read as keypresses with  the  get_ch(),  input(  and
  1437. enter( functions.
  1438.  
  1439.     Example:       store_keys("Your program typed this in.!");
  1440.  
  1441. Once you have stored the characters using this function, nothing will
  1442. happen  until  execution  comes  to  the  next  get_ch(),  get_num(),
  1443. get_any(), or any of the input or enter functions.
  1444.  
  1445. When that happens, the actual keyboard will not be read. Instead  the
  1446. character  will  be fetched from the string. You can adjust the speed
  1447. at  which  characters  are  read  by  setting  the KBDDEL variable as
  1448. follows: 'set(KBDDEL,88);'. The get_ch() function does a  delay  with
  1449. every read just for the purpose of  slowing  down  internally  stored
  1450. strings. KBDDEL is usually set to '1' so there is no delay unless you
  1451. reset it.
  1452.  
  1453.  
  1454. You  can  place  special  characters  in  the  string  which have the
  1455. following meaning:
  1456.  
  1457.  
  1458.                 '%'  is ALT
  1459.                 '!'  is RETURN
  1460.                 '@'  is ESC
  1461.                 '<'  is LEFT ARROW
  1462.                 '>'  is RIGHT ARROW
  1463.                 '^'  is UP ARROW
  1464.                 '~'  is DOWN ARROW
  1465.  
  1466.  
  1467. The JJB demo does a 'store_keys("%!>>>>>>>>>@");' to show you some
  1468. fast windowing.
  1469.  
  1470.  
  1471. ---------------------------------------------------------------------
  1472. void strcopy(char *pointer, char *pointer)                   strcopy(
  1473. ---------------------------------------------------------------------
  1474.  
  1475. This function does a simple string copy. An example is: 
  1476.  
  1477.         char string[30];
  1478.         char *sp;
  1479.         sp = &string[0];
  1480.         strcopy("Copy this", &string[0];
  1481.         strcopy("Copy this",sp);
  1482.  
  1483.  
  1484. ---------------------------------------------------------------------
  1485. void va(unsigned int color)                                       va(
  1486. ---------------------------------------------------------------------
  1487.  
  1488. This is the lowest-level function for setting the color. Here is an
  1489. example:
  1490.  
  1491.                 va(RED ONBLACK);
  1492.  
  1493. It does not take into consideration monochrome like the 'set_color('
  1494. function does. Use it only when you know  the  monitor  your  program
  1495. will be displayed on. It does 'exactly' the same thing as:
  1496.  
  1497.              set(VATTRIB, RED ONBLACK)G.
  1498.  
  1499.  
  1500. ---------------------------------------------------------------------
  1501. int vbl(void)                                                    vbl(
  1502. ---------------------------------------------------------------------
  1503.  
  1504. This function returns the video fast 'vf' invisible  offset  for  the
  1505. beginning of the row you are on. It will be an integer from 0-1999.
  1506.  
  1507. Example:      int beg_line;
  1508.               beg_line = vbl();
  1509.                                                     
  1510.  
  1511. ---------------------------------------------------------------------
  1512. void vfbout(char)                                              vbout(
  1513. ---------------------------------------------------------------------
  1514.  
  1515. This does a video fast 'vf' of the bits of one byte.
  1516.  
  1517.             vfbout(9);    puts out:  0000 1001
  1518.  
  1519.  
  1520. ---------------------------------------------------------------------
  1521. void vch(char ch, int voffset)                                   vch(
  1522. ---------------------------------------------------------------------
  1523.  
  1524. This is a low-level video fast 'vf' function which puts on the screen
  1525. one character at the invisible offset position: Here is an example:
  1526.  
  1527.         char ch;
  1528.         ch = 'A';
  1529.         for (x=70; x<=159;  x++)  {
  1530.  
  1531.                vch(ch, x);
  1532.  
  1533.             }
  1534.  
  1535. The  above  will put 80 characters on the screen. Ten characters will
  1536. appear on row one, and 70 characters will appear on row two.
  1537.  
  1538.  
  1539. ---------------------------------------------------------------------
  1540. void vclr_screen(void)                                   vclr_screen(
  1541. ---------------------------------------------------------------------
  1542.  
  1543. This is a video fast 'vf' function which clears the screen and places
  1544. the 'vf' invisible cursor in the home position.
  1545.  
  1546.  
  1547. ---------------------------------------------------------------------
  1548. void vclreol(void)                                           vclreol(
  1549. ---------------------------------------------------------------------
  1550.  
  1551. This  function will clear to end of a line starting at the video fast
  1552. 'vf' offset position. It clears to  the  end  of  the  row  from  the
  1553. present invisible 'vf' cursor.
  1554.  
  1555.  
  1556. ---------------------------------------------------------------------
  1557. void vclrft(int from, int to)                                 vclrft(
  1558. ---------------------------------------------------------------------
  1559.  
  1560. This function clears the screen from one row to another.
  1561.  
  1562. Example:    vclrft(2,24);
  1563.  
  1564. The  above example clears rows 2 through 24, leaving row 1 and row 25
  1565. on the screen.
  1566.  
  1567.  
  1568. ---------------------------------------------------------------------
  1569. void vclrw(void)                                               vclrw(
  1570. ---------------------------------------------------------------------
  1571.  
  1572. This  function clears the main JJB window. If you do not want a window
  1573. to appear, set the following switch in jjb_setup(): set(VCLRW_SW,T).
  1574. Once set, vclrw() function will clear rows 2 through 24 not making  a
  1575. window.
  1576.  
  1577.  
  1578. ---------------------------------------------------------------------
  1579. void vcr(void)                                                   vcr(
  1580. ---------------------------------------------------------------------
  1581.  
  1582. This  function  videos  fast  'vf'  a  carriage  return.  It  is the
  1583. 'vf' equivalent of 'printf("\n");'.
  1584.  
  1585.  
  1586. ---------------------------------------------------------------------
  1587. void vcrs(int x)                                                vcrs(
  1588. ---------------------------------------------------------------------
  1589.  
  1590. This videos fast 'vf' x number of carriage returns.
  1591.  
  1592.  
  1593. ---------------------------------------------------------------------
  1594. void vf_window(row,column,depth,width)                     vf_window(
  1595. ---------------------------------------------------------------------
  1596.  
  1597. This function videos fast 'vf'  a  window  at  integer  row,  column,
  1598. depth, and width. 
  1599.  
  1600.                 Example: vf_window(8,20,10,50);
  1601.  
  1602.  
  1603. You can use the set_color(COLOR ONCOLOR) before using  this  function
  1604. to make any color window you choose.
  1605.  
  1606.  
  1607. ---------------------------------------------------------------------
  1608. void vfc(char)                                                   vfc(
  1609. ---------------------------------------------------------------------
  1610.  
  1611. Use this function to video fast 'vf' a character on the screen.  Here
  1612. is an example: 
  1613.  
  1614.                 char ch;
  1615.                 ch = get_ch();
  1616.                 vfc(ch);
  1617.  
  1618.  
  1619. ---------------------------------------------------------------------
  1620. void vfcc(char)                                                 vfcc(
  1621. ---------------------------------------------------------------------
  1622.  
  1623. Use  this  function  to  video fast a character on the screen placing
  1624. the physical cursor after it. Here is an example:
  1625.  
  1626.                 char ch;
  1627.                 ch = get_ch();
  1628.                 vfcc(ch);
  1629.  
  1630. If  you  have the source code for the JJB input routines then you can
  1631. see that this function was used to display each character as  it  was
  1632. typed in.
  1633.  
  1634.  
  1635. ---------------------------------------------------------------------
  1636. void vfi(int number)                                             vfi(
  1637. ---------------------------------------------------------------------
  1638.  
  1639. This function videos fast 'vf' an integer on the screen.
  1640.  
  1641. Examples:
  1642.  
  1643.                 vfi(1200);
  1644.                 vfi(x);
  1645.  
  1646.  
  1647. ---------------------------------------------------------------------
  1648. void vfir(int number, int fieldlength)                          vfir(
  1649. ---------------------------------------------------------------------
  1650.  
  1651. Use  this  function  to  video  fast  'vf'  an  integer  in  a field,
  1652. right-justified.
  1653.  
  1654. Examples:
  1655.                 vfir(x,5);
  1656.                 vfir(123,5);
  1657.  
  1658. This  might be on another subject, but one nice thing about the input
  1659. routines is that in addition to editing the numbers input, they  also
  1660. return the number right-justified in a field ready to be displayed on
  1661. the monitor. In that case you do not need to use this function.
  1662.  
  1663.  
  1664. ---------------------------------------------------------------------
  1665. void vfs(char *pointer)                                          vfs(
  1666. ---------------------------------------------------------------------
  1667.  
  1668. This  function  videos  fast  'vf'  a  string at the invisible cursor
  1669. position. 
  1670.  
  1671. Examples:      
  1672.                 char string[40];
  1673.                 char *sp;
  1674.         
  1675.                 sp = &string[0];
  1676.  
  1677.                 vfs("Put out this string.");
  1678.                 vfs(sp);
  1679.                 vfs(&string[0]);
  1680.  
  1681.  
  1682. ---------------------------------------------------------------------
  1683. void vfsc(char *pointer)                                        vfsc(
  1684. ---------------------------------------------------------------------
  1685.  
  1686. This  function  is  the  same  as  'vfs(' except it puts the physical
  1687. cursor on the screen after putting out the string.
  1688.  
  1689. Normally, the 'vf' function advances the video offset so your strings
  1690. and  integers  are  not  all placed in the same location. They do not
  1691. normally place the physical cursor because then  they  would  not  be
  1692. fast. This function videos fast the string and then places the actual
  1693. physical cursor at the end.
  1694.  
  1695.  
  1696. ---------------------------------------------------------------------
  1697. void vfsdo(char *ptr,int down,int over)                        vfsdo(
  1698. ---------------------------------------------------------------------
  1699.  
  1700. The 'vfsdo(' function, videos fast 'vf' a string of  chararacter  and
  1701. then comes down and over on the screen. Once set, you may use ',SAME'
  1702. to duplicate the previous functions.
  1703.  
  1704.  
  1705.         vloc(6,20);
  1706.         vfsdo("Put this on screen.',2,20);
  1707.         vfsdo("This appears on row 8  starting at column 20",SAME);
  1708.         vfsdo("This appears on row 10 starting at column 20",1,20);
  1709.         vfsdo("This appears on row 11 starting at column 20",SAME);
  1710.         vfs("Press any key ");
  1711.         get_ch();
  1712.  
  1713.  
  1714. ---------------------------------------------------------------------
  1715. void vfsl( char *pointer, int fieldlength)                      vfsl(
  1716. ---------------------------------------------------------------------
  1717.  
  1718. This function videos fast 'vf' a string left justifing it in a field.
  1719. It is a very useful function when you do not know how many characters
  1720. will be put out.
  1721.  
  1722.  
  1723. Example:      vfsl("Put 6 blanks after this.",30);
  1724.  
  1725.  
  1726. The above string is only 24 characters in length. The required  field
  1727. length is 30, so 6 blanks will be put out after the string.
  1728.  
  1729.  
  1730. ---------------------------------------------------------------------
  1731. void vftout(char,int x)                                       vftout(
  1732. ---------------------------------------------------------------------
  1733.  
  1734. 'vftout('  stands  for  video  fast  times  out. It does a super fast
  1735. character out x number of times.
  1736.  
  1737. Example:
  1738.             vloc(10,1);        /* locate 'vf' at row 10 column 1  */
  1739.             vftout('-',80);    /* put out 80 hyphens              */
  1740.  
  1741. The  above  example  places  a  line  on  the  screen  at  row  10 at
  1742. extremely high speed.
  1743.  
  1744.  
  1745. ---------------------------------------------------------------------
  1746. void vfw(row,col,width,depth)                                    vfw(
  1747. ---------------------------------------------------------------------
  1748.  
  1749. The 'vfw(' function makes a video fast 'vf' window on the screen. 
  1750.  
  1751.  
  1752.  
  1753. Example:       set_color(RED ONBLUE);
  1754.                vfw(8,16,50,10);
  1755.                normal();
  1756.  
  1757.  
  1758. The above example makes a window with a blue  background  at  row  8,
  1759. column 16, width of 50, and depth of 10 rows. The color attribute was
  1760. then set back to the normal color.
  1761.  
  1762.  
  1763. ---------------------------------------------------------------------
  1764. void vgrid(void)                                               vgrid(
  1765. ---------------------------------------------------------------------
  1766.  
  1767. This  function  places  a border around the screen. You can use it to
  1768. help determine rows and columns. JJB  is  designed  so  that  if  you
  1769. press  CONTROL  G  whenever your program is expecting a keypress, JJB
  1770. will place this programmer's grid on the screen.
  1771.  
  1772.  
  1773. ---------------------------------------------------------------------
  1774. void vloc(int row, int column)                                  vloc(
  1775. ---------------------------------------------------------------------
  1776.  
  1777. This  function sets the video fast 'vf' invisible cursor. Row must be
  1778. an integer from 1 to 25. Column must be an integer from 1 to 80.
  1779.  
  1780. You  can  access  this  value  with  the  'getvoff()'  function  as a
  1781. number from 0 to 1999. The 'setvoff(' function is the same as 'vloc('
  1782. except it requires only one number 0-1999 to set the  'vf'  invisible
  1783. cursor.
  1784.  
  1785. 'vloc(1,1)' sets the 'vf' offset to the top left hand corner.
  1786. 'vloc(25,80)' set the 'vf' offset to the bottom right hand corner.
  1787. 'vloc(1,1) is exactly the same as setvoff(0).
  1788.  
  1789.  
  1790. ---------------------------------------------------------------------
  1791. char vr(int voffset)                                              vr(
  1792. ---------------------------------------------------------------------
  1793.  
  1794. This  function  reads a character with color attribute from the video
  1795. monitor returning it to you.
  1796.  
  1797.  
  1798. ---------------------------------------------------------------------
  1799. unsigned char vrc(int voffset)                                   vrc(
  1800. ---------------------------------------------------------------------
  1801.  
  1802. This function reads one character from the JJB save screen array, and
  1803. places it on the screen with its attribute. 
  1804.  
  1805. The  function 'vsave_screen()' stores the entire screen in the array.
  1806. With the 'vrc(' function you can fetch a character from the array and
  1807. place it back on the screen. This function was used in the  JJB  demo
  1808. to slide the window across the screen very smoothly.
  1809.  
  1810.  
  1811. ---------------------------------------------------------------------
  1812. void vrest_scr(int array address)                          vrest_scr(
  1813. ---------------------------------------------------------------------
  1814.  
  1815. This function restores a screen from an array. See  the  'vsave_scr('
  1816. function for examples.
  1817.  
  1818.  
  1819. ---------------------------------------------------------------------
  1820. void vrest_screen()                                     vrest_screen(
  1821. ---------------------------------------------------------------------
  1822.  
  1823. This  function restores the screen from the JJB integer array. Use it
  1824. after the vsave_screen() function to restore the screen.
  1825.  
  1826.  
  1827. ---------------------------------------------------------------------
  1828. void vsave_scr(int array address)                          vsave_scr(
  1829. ---------------------------------------------------------------------
  1830.  
  1831. This function allows you to save a screen. It can be used to save  as
  1832. many  screens  as  you  need. Below is an example of how to use it to
  1833. simultaneously save and restore two screens.
  1834.  
  1835. any_function() {
  1836.  
  1837.      int screen1[2000];   /* integer array for a screen     */
  1838.      int screen2[2000];   /* integer array for a screen     */
  1839.  
  1840.      vsave_scr(&screen1[0];         /* save screen 1        */
  1841.      clr_screen();                  /* clear the screen     */
  1842.      vloc(1,1);                     /* home the 'vf' cursor */
  1843.      vfs("First message");          /* put text on screen   */
  1844.      vsave_scr(&screen1[0]);        /* save screen 1        */
  1845.      vloc(1,1);                     /* home the 'vf' cursor */
  1846.      vfs("Second message");         /* put text on screen   */
  1847.      vsave_scr(&screen1[0]);        /* save screen 2        */
  1848.  
  1849.      vrest_scr(&screen1[0];         /* restore  screen 1    */
  1850.      get_ch();                      /* stop to pause        */
  1851.      vrest_scr(&screen2[0];         /* restore  screen 2    */
  1852.   }
  1853.  
  1854. There is no limit to the number of screens you can save  and  restore
  1855. with this function.
  1856.  
  1857.  
  1858. ---------------------------------------------------------------------
  1859. void vsave_screen(void)                                 vsave_screen(
  1860. ---------------------------------------------------------------------
  1861.  
  1862. This  function  saves the screen in the JJB integer array. It is used
  1863. by JJB to save the screen  before  doing  the  pull-down  menus.  The
  1864. screen can be restored with 'vrest_screen();'.
  1865.  
  1866.  
  1867. ---------------------------------------------------------------------
  1868. void vspace(void)                                             vspace(
  1869. ---------------------------------------------------------------------
  1870.  
  1871. This function is the video fast 'vf' equivalent of printf(" ").
  1872.  
  1873.  
  1874. ---------------------------------------------------------------------
  1875. void vspaces(int x)                                          vspaces(
  1876. ---------------------------------------------------------------------
  1877.  
  1878. This function videos fast 'vf' x number of spaces on the screen.
  1879.  
  1880.  
  1881. ---------------------------------------------------------------------
  1882. void underline(void)                                       underline(
  1883. ---------------------------------------------------------------------
  1884.  
  1885. Use  'underline()'  in  your  program  when  you  want  to change the
  1886. color  attribute  to  the  underline  color.  This  function properly
  1887. handles both color and monochrome displays.
  1888.  
  1889. This function resets the 'vf' color attribute to the underline  color
  1890. attribute. On monochrome it is '_' (1). 
  1891.  
  1892. The reverse color attribute is set in  jjb_initalize()  as  followed:
  1893. set(VRCOLOR,  BLUE  ONWHITE).  It  can  be  changed in jjb_setup() as
  1894. in this example: set(VRCOLOR, RED ONWHITE);
  1895.  
  1896.  
  1897. ---------------------------------------------------------------------
  1898. char upcase(char)                                             upcase(
  1899. ---------------------------------------------------------------------
  1900.  
  1901. This function returns the upper case of the character sent to it.
  1902.                                      
  1903.  
  1904.  
  1905.  
  1906.  
  1907.  
  1908. ******************************************************************************
  1909. *                                                                            *
  1910. *  Functions in file:                                                        *
  1911. *                                                                            *
  1912. *                                ( Note 1 )               ( Note 1 )         *
  1913. *                                                                            *
  1914. *       JJBQC.OBJ &            JJBQCINP.OBJ  &          JJBQCDOL.OBJ &       *
  1915. *       JJBTC.OBJ              JJBTCINP.OBJ             JJBTCDOL.OBJ         *
  1916. *    ---------------       ---------------------     -------------------     *
  1917. *                                                                            *
  1918. *     jjb_initalize()       input(                      input_dollar(        *
  1919. *     jjb_start()           input_num(                  enter_dollar(        *
  1920. *     group(                input_lnum)                                      *
  1921. *     option(               enter(                                           *
  1922. *     init(                 enter_num(                                       *
  1923. *     leave(                enter_lnum(                                      *
  1924. *     help(                 Plus additional functions                        *
  1925. *     default_opt()           you can use to make                            *
  1926. *     dosexit(                your own input and                             *
  1927. *     plus the other          enter functions                                *
  1928. *       functions listed                                                     *
  1929. *       above                                                                *
  1930. *                                                                            *
  1931. *  Note 1: The complete source for these object modules will be sent to      *
  1932. *          users who register with JJB.                                      *
  1933. *                                                                            *
  1934. ******************************************************************************
  1935.  
  1936.  
  1937.  
  1938. ******************************************************************************
  1939. *                                                                            *
  1940. *                                 jjb_start()                                *
  1941. *                                                                            *
  1942. *  This function, in its simplest form, is  a continuous loop.               *
  1943. *                                                                            *
  1944. *                                                                            *
  1945. *  while (1) {                                                               *
  1946. *                                                                            *
  1947. *               execute the function initalizing the group, if any.          *
  1948. *                                                                            *
  1949. *               execute the function initalizing the option, if any.         *
  1950. *                                                                            *
  1951. *    ------->   execute the function for the option.                         *
  1952. *                 (long jump to here when changing options.                  *
  1953. *               execute the function leaving the option, if any.             *
  1954. *                                                                            *
  1955. *               execute the funtion leaving the group, if any.               *
  1956. *                                                                            *
  1957. *            }                                                               *
  1958. *                                                                            *
  1959. * Changing options does a long jump back to this loop finishing up the       *
  1960. * option and group and starting a new one.                                   *
  1961. *                                                                            *
  1962. ******************************************************************************
  1963.  
  1964.  
  1965.  
  1966.  
  1967.  
  1968. ******************************************************************************
  1969. *                                                                            *
  1970. *   Functions you may use in  jjb_setup():                                   *
  1971. *                                                                            *
  1972. *     group(         Start a new group of option & assign group description. *
  1973. *                                                                            *
  1974. *     option(        Define the next option by assigning a  description      *
  1975. *                                                                            *
  1976. *     funct(         Assign a function name to an option.                    *
  1977. *                                                                            *
  1978. *     init(          Assign a function name to initalize group or option.    *
  1979. *                                                                            *
  1980. *     leave(         Assign a function name to  exit a group or option.      *
  1981. *                                                                            *
  1982. *     default_opt(   Tag this option as the default option.                  *
  1983. *                                                                            *
  1984. *     help(          Assign a function name for F1 help key.                 *
  1985. *                                                                            *
  1986. *     dosexit(       Assign function be be executed when exiting to DOS.     *
  1987. *                                                                            *
  1988. *     set(          Change variable or switch setting in the integer array   *
  1989. *                                                                            *
  1990. ******************************************************************************
  1991.  
  1992.  
  1993. ******************************************************************************
  1994. *                                                                            *
  1995. *           char * input(int length)                                         *
  1996. *           char * input_num(int length, int from, int to)                   *
  1997. *           char * input_lnum(int length, long from, long to)                *
  1998. *           char * input_dollar()                                            *
  1999. *                                                                            *
  2000. *  These are high-level programming functions. They all return the address   *
  2001. *  of the string input. The complete source comments will be sent to users   *
  2002. *  who register with JJB.                                                    *
  2003. *                                                                            *
  2004. ******************************************************************************
  2005.  
  2006.  
  2007.  
  2008.  
  2009. ======================================================================
  2010. ***                    JJB REGISTRATION FORM                       ***
  2011. ======================================================================
  2012. To print this form from DOS enter: TYPE JJB-FORM.DOC > PRN:
  2013.  
  2014.  
  2015. Registration entitles you to:
  2016.  
  2017.     1.  The latest version of ALL JJB software.
  2018.     2.  The JJB manual (refered to as the printed documentation).
  2019.     3.  The complete source code with comments for the all input and
  2020.            and enter functions which are designed so you will be
  2021.            abto to easily make your own enter functions.
  2022.     4.  Free technical support.
  2023.     5.  The JJB newsletter.
  2024.  
  2025.  
  2026. To register, fill out this form and return it along with your check to:
  2027.  
  2028.                          JJB
  2029.                          9236 Church Rd, Suite 1082
  2030.                          Dallas, Tx  75231
  2031.  
  2032.  
  2033. ----------------------------------------------------------------------
  2034.  
  2035.  
  2036.                                                  Date _______________
  2037.  
  2038.  
  2039.       Name:  _____________________________________
  2040.  
  2041.    Address:  _____________________________________
  2042.             
  2043.              _____________________________________
  2044.  
  2045.              _____________________________________
  2046.  
  2047.  
  2048.      Phone:  (____)  _______________
  2049.  
  2050.  
  2051.           $ 49.00    JJB Registration
  2052.  
  2053.                      (Sales tax for Texas residents only. 8% )
  2054.  
  2055.              3.00    Shipping and Handling ($10 US dollars if overseas)
  2056.      -------------
  2057.                      Check amount payable to: JOHN JAMES BRODERICK or JJB
  2058.      ============= 
  2059.  
  2060.  
  2061.  
  2062.  
  2063.   COMMENTS AND SUGGESTIONS:
  2064.  
  2065.  
  2066.  
  2067.  
  2068.